<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/include :: header('新增商品属性')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-attr-add">
        <input type="hidden" name="goodsId" th:value="${goods.id}">
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">商品名称：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" readonly name="goodsName" required th:value="${goods.goodsName}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">属性：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="attribute" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label is-required">内容：</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="content" required>
            </div>
        </div>
		<div class="form-group">
			<label class="col-sm-3 control-label is-required">顺序：</label>
			<div class="col-sm-8">
				<input class="form-control" type="text" name="sort" required>
			</div>
		</div>
    </form>
</div>
<th:block th:include="common/include :: footer"/>
<th:block th:include="common/include :: datetimepicker"/>
<script type="text/javascript">
    var prefix = ctx + "/business/attr";

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/add", $('#form-attr-add').serialize());
        }
    }
</script>
</body>
</html>
